<?php
class MessageEditpage
{
	private $page;
	
	public function __construct()
	{
			$dbAcces = new db();
			$postQuery = $dbAcces->get("blogID, author, title, summary, tumbnail, content","blogID=".$_GET['id'],"bl_post");
			$message = $row = mysql_fetch_array($postQuery);
				$this->page['title'] = "edit post";
				$this->page['content'] = "<form name='newPost' action='?page=submitMessage' enctype='multipart/form-data' method='post'>
	<input type='hidden' name='id' value='".$row["blogID"]."' />
	<label for='title'>Title: </label> <input type='text' name='title' value='".$row["title"]."' /><br />
	<label for='summary'>Summary: </label> <textarea name='summary' cols='40' rows='5'>".$row["summary"]."</textarea><br />
	<label for='content'>content: </label><textarea name='content' cols='40' rows='10'>".$row["content"]."</textarea><br />
	<label for='tumbnail'>tumbnail: </label> <input type='file' name='tumbnail' /><br />
	<input type='submit' name='submit' value='save' /><br />
</form>";
	/****************************************************needs to be saved*******************************************************************************************/
	}

	public function getPage()
	{
		$page = $this->page;
		require_once("templates/Main.php");
	}
}
?>